<?php
// $Id: buddy_api.workflowng.inc,v 1.3 2008/02/22 08:11:02 nodestroy Exp $

/**
 * @file
 * Implements workflow_ng functionality for buddy_api
 */
 
/**
 * Implementation of hook_event_info()
 */
function buddy_api_event_info() {
  return array(
    'buddy_add' => array(
      '#label' => t('UserA adds UserB to his buddylist'),
      '#module' => t('buddy-api'),
      '#arguments' => array(
        'userA' => array('#entity' => 'user', '#label' => t('UserA, current User')),
        'userB' => array('#entity' => 'user', '#label' => t('UserB, user to add')),
        'buddyinfo' => array('#entity' => 'buddyinfo', '#label' => t('Buddyinfo')),
       ),
    ),
    'buddy_add_request' => array(
      '#label' => t('UserA requests to add UserB'),
      '#module' => t('buddy-api'),
      '#arguments' => array(
        'userA' => array('#entity' => 'user', '#label' => t('UserA, current User')),
        'userB' => array('#entity' => 'user', '#label' => t('UserB, user to add')),
        'buddyinfo' => array('#entity' => 'buddyinfo', '#label' => t('Buddyinfo')),
       ),
    ),
    'buddy_remove' => array(
      '#label' => t('UserA deletes UserB from his buddylist'),
      '#module' => t('buddy-api'),
      '#arguments' => array(
        'userA' => array('#entity' => 'user', '#label' => t('UserA, current User')),
        'userB' => array('#entity' => 'user', '#label' => t('UserB, user to delete')),
        'buddyinfo' => array('#entity' => 'buddyinfo', '#label' => t('Buddyinfo')),
       ),
    ),
    'buddy_cancel_request' => array(
      '#label' => t('UserA cancels his own request to UserB'),
      '#module' => t('buddy-api'),
      '#arguments' => array(
        'userA' => array('#entity' => 'user', '#label' => t('UserA, current User')),
        'userB' => array('#entity' => 'user', '#label' => t('UserB, potential buddy')),
        'buddyinfo' => array('#entity' => 'buddyinfo', '#label' => t('Buddyinfo')),
       ),
    ),
    'buddy_request_accept' => array(
      '#label' => t('UserB accepts request from UserA'),
      '#module' => t('buddy-api'),
      '#arguments' => array(
        'userA' => array('#entity' => 'user', '#label' => t('UserA, new buddy')),
        'userB' => array('#entity' => 'user', '#label' => t('UserB, current User')),
        'buddyinfo' => array('#entity' => 'buddyinfo', '#label' => t('Buddyinfo')),
       ),
    ),
    'buddy_request_deny' => array(
      '#label' => t('UserA denys accept from UserB'),
      '#module' => t('buddy-api'),
      '#arguments' => array(
        'userA' => array('#entity' => 'user', '#label' => t('UserA, current User')),
        'userB' => array('#entity' => 'user', '#label' => t('UserB, user which has requested')),
        'buddyinfo' => array('#entity' => 'buddyinfo', '#label' => t('Buddyinfo')),
       ),
    ),
  );
}

/**
 * Implementation of hook_module_info
 */
function buddy_api_module_info() {
  return array(
    'buddy_api_workflow_ng_configuration' => array(
      'file' => 'buddy_api.workflowng.configurations.inc',
      'file path' => drupal_get_path('module', 'buddy_api'),
    ),
  );
}
